home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / despereaux-swings.swf / scripts / swings / Help0Script.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  1.6 KB  |  56 lines

  1. package swings
  2. {
  3.    import flash.display.*;
  4.    import flash.events.*;
  5.    import flash.net.*;
  6.    
  7.    public class Help0Script extends MovieClip
  8.    {
  9.        
  10.       
  11.       public var nextButton:SimpleButton;
  12.       
  13.       public var frame:String;
  14.       
  15.       public var animation:MovieClip;
  16.       
  17.       public var sharer:MovieClip;
  18.       
  19.       public var logo:MainLogo;
  20.       
  21.       public function Help0Script()
  22.       {
  23.          frame = SwingsGame(parent).currentLabel;
  24.          super();
  25.          if(SwingsGame(parent).pastDate)
  26.          {
  27.             logo.gotoAndStop(2);
  28.          }
  29.          else
  30.          {
  31.             logo.gotoAndStop(1);
  32.          }
  33.          nextButton.addEventListener(MouseEvent.MOUSE_DOWN,startGame);
  34.          sharer.helpBtn.visible = false;
  35.          sharer.shareBtn.addEventListener(MouseEvent.MOUSE_DOWN,gotoShare);
  36.          SwingsGame(parent).returnTo = "help0";
  37.       }
  38.       
  39.       private function gotoShare(param1:MouseEvent) : *
  40.       {
  41.          sharer.shareBtn.removeEventListener(MouseEvent.MOUSE_DOWN,gotoShare);
  42.          nextButton.removeEventListener(MouseEvent.MOUSE_DOWN,startGame);
  43.          SwingsGame(parent).fade("share");
  44.       }
  45.       
  46.       public function startGame(param1:MouseEvent) : *
  47.       {
  48.          var _loc2_:* = undefined;
  49.          nextButton.removeEventListener(MouseEvent.MOUSE_DOWN,startGame);
  50.          sharer.shareBtn.removeEventListener(MouseEvent.MOUSE_DOWN,gotoShare);
  51.          SwingsGame(parent).fade("game");
  52.          _loc2_ = SwingsGame(parent).returnTo == "help0";
  53.       }
  54.    }
  55. }
  56.